<?php
include '../class/blog.php';
include '../class/comment.php';
include '../class/visitor.php';
include '../class/facade.php';

$step = @intval($_GET['step']);
//获取博客列表
if ($step>=0){
	$blog = new Blog();
	$blog->get(10);
	
	$comment = new Comment();
	$comment->get(5);
	
	$visitor = new Visitor();
	$visitor->get(8);
}
if ($step>1){
	echo '<hr/>';
	//利用外观模式
	$facade = new Facade();
	$params = array(
		'blog'	=> 10,
		'comment'	=> 5,
		'visitor'	=> 8,
	);
	$facade->get($params);
}